home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 15 / 015.d81 / simple list (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  500b  |  18 lines

  1. 50 cr$=chr$(13):co$=chr$(58)
  2. 60 qu$=chr$(34):qu=0
  3. 100 input"[147]program name";pn$:ifpn$="quit"thenend
  4. 110 open1,8,2,pn$+",s,r":open15,8,15:input#15,e,e$
  5. 120 ife>20thenprint"disk error: "e,e$:close1:close15:end
  6. 130 open4,4
  7. 140 get#1,a$,a$
  8. 150 print#4,"program: ";pn$;cr$;cr$
  9. 160 ns$="":qu=0
  10. 170 get#1,n$:ifst<>0then220
  11. 175 ifn$<>chr$(32)thenns$=ns$+n$:goto170
  12. 180 print#4,right$("    "+ns$+"  ",7);:ps$=""
  13. 190 get#1,x$:ps$=ps$+x$:ifx$=qu$thenqu=1-qu
  14. 200 if(x$=co$andqu=0)thenprint#4,ps$:print#4,"        ";:ps$=""
  15. 210 ifx$=cr$thenprint#4,ps$:ifst=0then160
  16. 215 ifst=0then190
  17. 220 print#4,cr$;"end of listing";cr$;cr$:close4:close1:close15
  18.